package hos.service;

import hos.constants.Api;
import hos.http.HttpBaseRequestBody;
import hos.http.HttpRequest;
import hos.http.anotation.BaseUrl;
import hos.http.anotation.Data;
import hos.http.anotation.GET;
import hos.http.anotation.POST;
import hos.http.anotation.Param;
import hos.http.anotation.Query;

/**
 * <p>Title: MockService </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2024-04-24 11:06
 */
@BaseUrl("http://127.0.0.1:10086")
public interface MockService {

    @GET(Api.TEXT)
    HttpRequest<?> getText(@Query("name") String value);

    @GET(Api.DELAY)
    HttpRequest<?> getDelay();

    @POST(Api.UPLOAD)
    HttpBaseRequestBody<?> upload();

    @POST(Api.GAME)
    HttpBaseRequestBody<?> getGame(@Param("keyword") String keyword);

    @GET(Api.TIME)
    HttpRequest<?> getTime(@Data String data);

    @GET(Api.ARRAY)
    HttpRequest<?> getArray();

    @GET(Api.CONFIG)
    HttpRequest<?> getConfig();

    @GET(Api.Token)
    HttpRequest<?> getToken();

    @POST(Api.USER_INFO)
    HttpBaseRequestBody<?> getUserInfo(@Param("token") String token);

    @POST(Api.REQUEST)
    HttpBaseRequestBody<?> request(@Data() Object request);
}
